{present name="_G.mod"}
{foreach name="_G.mod" item='val' key='name'}
{switch name="val.1" }
  {case value="radio"}
  	<div class="form-group">
    <label for="mod[{$name}]">{$val.0}</label>
	{foreach name="$val.2" item='val2'}
      <label class="checkbox-inline">
      <input type="{$val.1}" class="{$name}" name="mod[{$name}]" value="{$val2}" {$val.valu == $val2 ? 'checked' : ''} > {$val2}
	  </label>
    {/foreach}
</div>
  {/case}

  {case value="checkbox"}
  	<div class="form-group">
    <label for="mod[{$name}][]">{$val.0}</label>
	{foreach name="$val.2" item='val2'}
      <label class="checkbox-inline">
      <input type="{$val.1}" name="mod[{$name}][]" class="{$name}" value="{$val2}"
      {foreach name="$val.value" item='val3'}
      	{$val3 == $val2 ? 'checked' : ''}
      {/foreach}
       />
      {$val2}
	  </label>
    {/foreach}
	</div>
  {/case}

  {case value="select"}
	<label for="mod[{$name}]">{$val.0}</label>
  	<select name="mod[{$name}]" class="{$name} form-control">
      {foreach name="$val.2" item='val2'}
      <option {$val.value == $val2 ? 'selected' : ''}>{$val2}</option>
      {/foreach}

    </select>
  {/case}

  {case value="textarea"}
	<label for="mod[{$name}]">{$val.0}</label>
  	<textarea name="mod[{$name}]" class="{$name}" rows="3" class="form-control">{$val.value|default=''}</textarea>
  {/case}

  {default /}
    <div class="form-group">
	  <label for="mod[{$name}]">{$val.0}</label>
	  <input name="mod[{$name}]" type="{$val.1}" value="{$val.value|default=''}" class="{$name} form-control">
	</div>
{/switch}
{/foreach}

<script>
$(function(){

});
</script>

{/present}